package cn.com.bluemoon.daps.model.core.file.validator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * @author Jarod.Kong
 * @date 2021/3/16 9:55
 */

@Inherited
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD})
@Documented
@Constraint(validatedBy = TopicCategoryValidator.class)
public @interface MyTopicCategory {

    String name() default "主题";

    String message() default "主题分类：{name}列值与系统分类匹配失败";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

    @Target({FIELD})
    @Retention(RUNTIME)
    @Documented
    @interface List {

        MyTopicCategory[] value();
    }
}